package person.csx.studentgradle.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;
import person.csx.studentgradle.model.Student;

import java.util.List;
//创建一个数据访问对象bean，他的默认名字是studentDao
@Mapper
public interface StudentDao extends BaseMapper<Student> {
    @Select("select * from student limit #{fromIndex},#{pageSize}")
    List<Student> selectByPage(int fromIndex,int pageSize);
    @Select("select * from student where name=#{name}")
    List<Student> checkOnlyByName(String name);

    @Select("select * from student where Id=#{Id}")
    List<Student> checkOnlyById(String id);
}
